package com.dotflat.agreement.domain;

import com.dotflat.rest.domain.AreableObjectBase;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

@Entity
@Table(name = "op_agreement_record")
@Data
@EqualsAndHashCode(callSuper = true)
public class OPAgreementRecord extends AreableObjectBase {

	@Column(name = "static_url", columnDefinition = "varchar(512) COMMENT '持久化文件'")
	private String staticUrl;

	@Column(name = "sign_url", columnDefinition = "varchar(512) COMMENT '持久化文件'")
	private String signUrl;

	@Column(columnDefinition = "bit(1) COMMENT '已读'")
	private String readed;

	@ManyToOne
	@JoinColumn(name = "agreementId", columnDefinition = "varchar(64) COMMENT '协议id'", insertable = false, updatable = false)
	private OPAgreement agreement;

	@Column(columnDefinition = "varchar(64) COMMENT '协议id'")
	private String agreementId;

}
